package com.ruoyi.wechat.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.util.ObjectUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * 驿站标签对象 app_delv_label
 *
 * @author YinHeng
 * @date 2024-03-13
 */
@Data
@TableName("app_delv_tag")
public class DelvTag {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 订单ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long orderId;

    /**
     * 标签名
     */
    private String name;
    /**
     * 手动输入数量
     */
    private Integer val;
    /**
     * 手动输入数量+截图标记数量
     */
    private Integer total;

    /**
     * 标签值
     */
    private String urls;

    /**
     * 标签类别,1：驿站、
     */
    private Integer category;

    @TableField(exist = false)
    private List<String> urlList;

    public List<String> getUrlList() {
        if (ObjectUtils.isEmpty(urlList)) {
            urlList = new ArrayList<>();
        }
        return urlList;
    }

    public void setUrlList(List<String> urlList) {
        this.urlList = urlList;
    }

}
